package com.aspose.cells;

class zyu extends zyr {
   protected zaar a;
   protected byte[] b;
   protected int c;
   protected int d;

   public zyu(byte[] var1, int var2, int var3) {
      this.b = var1;
      this.c = var2;
      this.d = var3;
   }

   public void a(boolean var1) {
      if (this.a == null) {
         this.a = new zaar();
      }

   }

   public zaar h() {
      return this.a;
   }

   public void a(zaar var1) {
      this.a = var1;
   }

   public int b() {
      return 11;
   }

   public Object c() {
      return null;
   }

   public byte a() {
      return this.b[this.c];
   }

   public boolean f() {
      return false;
   }

   public boolean c(zaay var1, boolean var2) {
      return true;
   }

   public zagu e(zaay var1) {
      if (this.a != null) {
         if (this.a.a != null) {
            return this.a.a;
         }
      } else {
         this.a = new zaar();
      }

      if (this.b[this.c] == 24 && this.b[this.c + 1] == 7) {
         int var2 = com.aspose.cells.b.a.zc.e(this.b, this.c + 2) & '\uffff';
         if (var2 < var1.g) {
            this.a.a = zaaq.a(var1.e, var1.g, this.b[this.c + 4] & 255 & 255, false, var1);
            return this.a.a;
         }
      }

      this.a.a = zzk.a;
      return null;
   }

   public void a(StringBuilder var1, zaay var2) {
      switch(this.b[this.c]) {
      case 24:
         switch(this.b[this.c + 1]) {
         case 7:
            Cell var5 = var2.d.getCells().checkCell(com.aspose.cells.b.a.zc.e(this.b, this.c + 2) & '\uffff', this.b[this.c + 4] & 255 & 255);
            if (var5 != null) {
               Object var4 = var5.getValue();
               if (var4 instanceof String) {
                  var1.append((String)var4);
                  return;
               }
            }
            break;
         case 29:
            if (var2 != null) {
               int var3;
               if (var2.a == 8) {
                  var3 = com.aspose.cells.b.a.zc.a(this.b, this.c + 2);
                  ((zaus)var2.f).a(var1, var3, var2.p.i());
                  return;
               }

               if (var2.a == 7) {
                  var3 = com.aspose.cells.b.a.zc.a(this.b, this.c + 2);
                  ((zauk)var2.f).a(var1, var3);
                  return;
               }
            }
         }

         var1.append("#REF!");
         return;
      default:
      }
   }

   public boolean a(zagu var1) {
      if (var1.b() != 11) {
         return false;
      } else {
         zyu var2 = (zyu)var1;
         if (this.d != var2.d) {
            return false;
         } else if (this.b == var2.b && this.c == var2.c) {
            return true;
         } else {
            for(int var3 = 0; var3 < this.d; ++var3) {
               if (this.b[this.c + var3] != var2.b[var2.c + var3]) {
                  return false;
               }
            }

            return true;
         }
      }
   }
}
